<%!
    public String getParameter(HttpServletRequest request, String name) {
        String value = request.getParameter(name);
        if (value == null) {
            return "";
        }
        return value;
    }
%>

<%@include file="/header.jsp" %>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.11&libraries=places&sensor=false"></script>
<script type="text/javascript" src="/resources/js/signup.js"></script>
<% if (request.getAttribute("validate") != null) { %>
<script type="text/javascript">
    $(function(){
        email_exist = "${email_exist}";
        $("form").validationEngine('validate');
    });
</script>
<% } %>
<h2 class="content_title">Registration</h2>
<table class="white_block" align="center" border="0">
    <thead>
        <tr>
            <th>
    <h2>Personal information</h2>
</th>
<th>
<h2>Important</h2>
</th>
</tr>
</thead>
<tbody>
    <tr>
        <td>
            <form method="post">
                E-mail <input type="email" name="email" class="validate[required,custom[email],funcCall[check_email_exist]]" size="50" value="${email}"><br>
                Password <input type="password" name="pass" class="validate[required,minSize[1],maxSize[32]]" id="pass" size="50"><br>
                Password again <input type="password" name="pass2" class="validate[required,minSize[1],maxSize[32],equals[pass]]" size="50"><br>
                First name <input type="text" name="first_name" class="validate[required,minSize[1],maxSize[32],funcCall[check_name]]" size="50" value="${first_name}"><br>
                Last name <input type="text" name="second_name" class="validate[required,minSize[1],maxSize[32],funcCall[check_name]]" size="50" value="${second_name}"><br>
                Location <input type="text" name="location" id="location" class="validate[required]" size="50" value="${location}"><br>
                <br>
                <input style="float: right;" type="submit" size="40" value="Register">
            </form>
        </td>
        <td style="float: top;">
            <div style="margin-left: 60px;">
                Please enter your real name, e-mail address and location. Your email address will be used for account management and communication with you. Please be sure to enter a valid shipping address so as it may impact your future orders.
                Your personal information is used only for internal
                processing of your orders. We do not share information about any of
                our users(whether active or inactive) to any kind of third parties.
        </td>
    </tr>
</tbody>
</table> 


<%@include file="/footer.jsp" %>